import React, { Component } from 'react';
import { Row, Col, Input, Button, Select, Form, Icon, Tabs } from 'antd';
import { withRouter } from "react-router-dom";
import AutoCreateInputItem from '../../utils/AutoCreateInputItem';
const {
    Option
} = Select;

const {
    TabPane
} = Tabs;


class App extends Component {

    constructor(props) {
        super(props);
      
    }
    //组件渲染后调用此方法
    componentDidMount() {
     

    }
    searchSubmit=()=>{
        this.props.form.validateFields((err, values) => {
            console.log(values);

        })
    }
 
    render() {
       
        const { getFieldDecorator } = this.props.form;

        const formItemLayout = {
            labelCol: {
                xs: {
                    span: 30
                },
                sm: {
                    span: 6
                },
            },
            wrapperCol: {
                xs: {
                    span: 24
                },
                sm: {
                    span: 14
                },
            },
        };

        return (
            <div className='shadow-radius'>
                    <Form {...formItemLayout} layout='horizontal' >
                        <Row>
                        <Col span={4}>
							<Form.Item label="姓名">
								{getFieldDecorator('userName_search')(
									<Input placeholder='请输入姓名'/>
								)}
							</Form.Item>
						</Col>
                            <AutoCreateInputItem ref={node => (this.form = node)} data={[{num:5,name:'物料批次号',code:'materielBatchCode',rules:false,placeholder:'请输入物料批次号'}]}/>

                            <Col span={2} style={{marginTop:'0.3rem'}} offset={1}><Button type="primary" onClick={this.searchSubmit}> <Icon type="search"
                                style={{ fontSize: '16px' }} /> 查询
                                        </Button ></Col>
                        </Row >

                    </Form>


            </div>
        );
    }
}
export default Form.create()(withRouter(App));
